// https://umijs.org/config/
import { resolve } from 'path'

import { defineConfig } from '@umijs/max'

import routes from '../src/routes'
import defaultSettings from './defaultSettings'

export default defineConfig({
  alias: {
    api: resolve(__dirname, '../src/services'),
    components: resolve(__dirname, '../src/components'),
    theme: resolve(__dirname, '../src/theme'),
    utils: resolve(__dirname, '../src/utils'),
  },
  // base: '/void',
  hash: true,
  ignoreMomentLocale: true,
  fastRefresh: true,
  moment2dayjs: {
    preset: 'antd',
    plugins: ['duration'],
  },
  locale: {
    // default zh-CN
    default: 'zh-CN',
    antd: true,
    // default true, when it is true, will use `navigator.language` overwrite default
    baseNavigator: true,
  },
  // styledComponents: {},
  mfsu: {
    mfName: 'mf',
    strategy: 'normal',
  },
  antd: {},
  access: {},
  model: {},
  initialState: {},
  request: {},
  layout: { ...defaultSettings },
  routes,
  npmClient: 'yarn',
})
